#!/bin/bash
LocalDir=$(cd "$(dirname $0)";pwd)
cd $LocalDir
head_ip='172.27.0'
timeout=3
count=3
for i in $(seq 1 254) ;do
{
    ip="${head_ip}.$i"
    ping -c $count -w $timeout $ip &> /dev/null
    if [ $? -eq 0 ] ;then
        echo "OK: $ip"
    else
        echo "ERROR: $ip"
    fi
} &
done